package com.scs.application.core.pdf.entity;

import com.alibaba.fastjson.annotation.JSONField;
import com.scs.application.core.pdf.enums.TextShowType;
import com.scs.application.core.pdf.json.EnumDeserializer;
import com.scs.application.core.pdf.json.EnumSerializer;
import lombok.Data;
import lombok.experimental.Accessors;
/**
 * @Description： PDF导出表单项
 */
@Data
@Accessors(chain = true)
public class PdfExportFormItem {


    private String field;

    private String label;

    private Object value;

    private int span;

    private int offset;

    private float height = 20;

    @JSONField(serializeUsing = EnumSerializer.class, deserializeUsing = EnumDeserializer.class)
    TextShowType textShowType = TextShowType.PLAIN;

    boolean showBarcodeText = true;

    public PdfExportFormItem( String label, Object value, int span) {
        this.field = "";
        this.label = label;
        this.value = value;
        this.span = span;
    }

    public PdfExportFormItem(String field, String label, Object value, int span) {
        this.field = field;
        this.label = label;
        this.value = value;
        this.span = span;
    }

    public PdfExportFormItem(String field, String label, Object value, int span, int offset) {
        this.field = field;
        this.label = label;
        this.value = value;
        this.span = span;
        this.offset = offset;
    }
}
